package di;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

//@Component
//@Scope("prototype")
public class ZhangFei {

    private String name="张飞";

    private SnakeLance snakeLance;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public SnakeLance getSnakeLance() {
        return snakeLance;
    }

    public void setSnakeLance(SnakeLance snakeLance) {
        this.snakeLance = snakeLance;
    }

    public void fight(){
        System.out.println(name+"使用"+snakeLance+"战斗");
    }


}
